//
//  oldOrderEndInfoViewController.m
//  laonianbangSupport
//
//  Created by 勇拓 李 on 18/3/6.
//  Copyright © 2018年 zaiyou. All rights reserved.
//

#import "oldOrderEndInfoViewController.h"

@interface oldOrderEndInfoViewController ()
@property (weak, nonatomic) IBOutlet UILabel *label_income;
@property (weak, nonatomic) IBOutlet UILabel *label_type;
@property (weak, nonatomic) IBOutlet UILabel *label_time;

@end

@implementation oldOrderEndInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initView];
    [self initData];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - initView
- (void)initView
{
    UIButton *leftbutton=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 40, 20)];
    
    //[leftbutton setBackgroundColor:[UIColor blackColor]];
    
    [leftbutton setTitle:@"完成" forState:UIControlStateNormal];
    
    [leftbutton addTarget:self action:@selector(leftbtnTapped:) forControlEvents:UIControlEventTouchDown];
    
    UIBarButtonItem *leftitem = [[UIBarButtonItem alloc]initWithCustomView:leftbutton];
    
    self.navigationItem.rightBarButtonItem = leftitem;
}

- (void)leftbtnTapped:(id)sender
{
    [self.navigationController dismissViewControllerAnimated:YES completion:nil];
}

#pragma mark - initData
- (void)initData
{
    _label_time.text = [NSString stringWithFormat:@"服务时间：%@", _orderInfo.costTime];
    _label_type.text = [NSString stringWithFormat:@"服务类型：%@", _orderInfo.serveCategory.cname];
    _label_income.text = _orderInfo.totalAmount;
}

@end
